<html>

<style>
table {
  border-collapse: collapse;
  border-spacing: none;
  }

thead th {
  background-color: #F7BE81;
  font-size: 12px;
  font-family: sans-serif;
  border:none;
  }

tbody td {
  font-size: 12px;
}


tr td:first-child,
tr th:first-child {
      border-top-left-radius: 6px;
	  border-bottom-left-radius: 6px;
}

tr td:last-child,
tr th:last-child {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}
</style>
 
<!--<script data-require="underscore.js@1.5.1" data-semver="1.5.1" src="//cdn.jsdelivr.net/underscorejs/1.5.1/underscore-min.js"></script> -->
   <h3>Monthly {{seltype}}  Wise Sales MIS for {{selyear}} Year</h3>
   
    Year :<select ng-model="selyear" > 
					<option value="">-- Choose Year --</option> 
					<option value="2014">2014</option>
	 				<option value="2013">2013</option>  
		  </select>
     
	Type :<select ng-model="seltype" > 
					<option value="">-- Choose Type --</option>
					<option value="AGENT">AGENT</option>
	 				<option value="CUSTOMER">CUSTOMER</option>
					<option value="CORPORATE">CORPORATE</option>  
					<option value="DISTRIBUTOR">DISTRIBUTOR</option>  
				<!--	<option value="VENDOR">VENDOR</option> -->
		  </select>
	 
	 <!-- ng-options="year.name for year in years" -->
	 
	
	 
	 <!-- 
	 <td>Year2 :<select ng-model="sortExpression">
	 	<option value="Jan">Jan</option>
					<option value="Feb">Feb</option> 
		  </select>
     </td> --> 
	 
   <input type="text" ng-model="search" class="search-query" placeholder="Search"> 
      <!--<button href="#/updttrandata/{{checkboxes.items}}"ng-click="updttrandata({{checkboxes.items}})" class="btn btn-success">Approve</button> 
      <a class="btn btn-success pull-right" href="#/updttrandata/{{checkboxes.items}}" ng-click="updttrandata({{checkboxes.items}})">Approve</a>-->
    </br>
   <!-- <tt>Total Records = {{traninvalidmast.length}}</tt> -->
    <!--<tt>Selected Year = {{counter}}</tt><br/> -->
      <!--<tt> <strong>Value:</strong> {{checkboxes.items[tran.Dist_Name]}}</tt> -->
  <!-- {{checkboxes.items}} -->
   
  <table class="table table-striped table-condensed table-hover">
      <thead>
      <tr>
    <!--  <th><a href="" ng-click="predicate = 'Sr_NO'; reverse=!reverse">Sr No.</a></th> -->
      <th><a href="" ng-click="predicate = 'customer'; reverse=!reverse">Agent Name</a></th>
    <!--   <th><a href="" ng-click="predicate = 'year'; reverse=!reverse">Year</a></th>
	   <th><a href="" ng-click="predicate = 'custtype'; reverse=!reverse">Type</a></th>-->
      <th><a href="" ng-click="predicate = 'Jan'; reverse=!reverse">Jan</a></th>
      <th><a href="" ng-click="predicate = 'Feb'; reverse=!reverse">Feb</a></th>
      <th><a href="" ng-click="predicate = 'Mar'; reverse=!reverse">Mar</a></th>
      <th><a href="" ng-click="predicate = 'Apr'; reverse=!reverse">Apr</a></th>
      <th><a href="" ng-click="predicate = 'May'; reverse=!reverse">May</a></th>
      <th><a href="" ng-click="predicate = 'Jun'; reverse=!reverse">Jun</a></th>
      <th><a href="" ng-click="predicate = 'Jul'; reverse=!reverse">Jul</a></th>
      <th><a href="" ng-click="predicate = 'Aug'; reverse=!reverse">Aug</a></th>
      <th><a href="" ng-click="predicate = 'Sep'; reverse=!reverse">Sep</a></th>
      <th><a href="" ng-click="predicate = 'Oct'; reverse=!reverse">Oct</a></th>
      <th><a href="" ng-click="predicate = 'Nov'; reverse=!reverse">Nov</a></th>
      <th><a href="" ng-click="predicate = 'Dec'; reverse=!reverse">Dec</a></th>
	  <th><a href="" ng-click="predicate = 'grandtotal'; reverse=!reverse">Total</a></th>
      </tr>
  </thead>

<tbody>
	<tr ng-repeat="user in traninvalidmast | filter: search  | filter:{year:selyear} |filter:{custtype:seltype}  | filter:{year.length:selyear.length} | orderBy:predicate:reverse | startFrom:currentPage*pageSize | limitTo:pageSize">
      <!--<td><input type="checkbox" ng-model="checkboxes.items[tran.Dist_Name]" ng-checked="updttrandata(tran)"ng-click="updttrandata(tran)" ng-change="change()" > </td>  -->
  <!--    <td><input type="checkbox" id="customValCheck"  ng-model="checkboxes.items[tran.Referenceno]"  ng-change="change({{tran}})"> </td>  mySortFunction -->
      <!--<td>{{user.Sr_NO}}</td> -->
      <td>{{user.customer}}</td>
     <!-- <td>{{user.year}}</td> 
	   <td>{{user.custtype}}</td>-->
       <td>{{user.Jan | number }}</td>
       <td>{{user.Feb | number}}</td>
       <td>{{user.Mar | number}}</td>
       <td>{{user.Apr | number}}</td>
       <td>{{user.May | number}}</td>
       <td>{{user.Jun | number}}</td>
       <td>{{user.Jul | number}}</td>
       <td>{{user.Aug | number}}</td>
       <td>{{user.Sep | number}}</td>
       <td>{{user.Oct | number}}</td>
       <td>{{user.Nov | number}}</td>
       <td>{{user.Dec | number}}</td>
	   <td>{{user.grandtotal | number}}</td>
	    <!--<td>{{ (user.Mar * 1) + (user.Apr * 1) | number}} </td>	-->
		<!-- <td>{{ (user.Jan * 1) + (user.Feb * 1)  + (user.Mar * 1) + (user.Apr * 1) + (user.May * 1) + (user.Jun * 1) + (user.Jul * 1) + (user.Aug * 1) + (user.Sep * 1) + (user.Oct * 1) + (user.Nov * 1) + (user.Dec * 1 ) }}</td> -->
     </tr>
    </tbody>
 </table>
   <tfoot>
        Current Page    {{currentPage+1}} of {{Math.ceil(traninvalidmast.length/pageSize)}}
      <td colspan="6">
         <div class="pagination pull-right">
           <ul>
          <!--  <li ng-class="{disabled: currentPage == 0}">
                <a href ng-click="currentPage=currentPage-1">« Prev</a> 
         </li>-->
          <button class="btn btn-info" ng-disabled="currentPage == 0" ng-click="currentPage=currentPage-1"> « Prev </button>
                    
           <li ng-repeat="n in range(traninvalidmast.length)"
               ng-class="{active: n == currentPage}"
               ng-click="setPage()">
                <a href ng-bind="n + 1">1</a>
           </li> 
           <!--    <li ng-class="{disabled: currentPage >= customermast.length/pageSize - 1 }">
                     <a href ng-click="currentPage=currentPage+1">Next »</a>  -->
    <button class="btn btn-info" ng-disabled="currentPage >= traninvalidmast.length/pageSize - 1" ng-click="currentPage=currentPage+1"> Next » </button>
   </li>
    </ul>
   </div>
   </td>
   </tfoot>
 
</body>
</html>
